<?php
/**
 * The template used for displaying content restaurant location in content-menus.php
 *
 * @package woodranch
 */
?>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($){
	jQuery("#contactform").validate();
	jQuery('#select-topic').change(function(){
				if (jQuery('.short:selected').length){
					jQuery('.local').css('display','none');	
					jQuery('.local input').removeClass('required');
					
				}else{
					jQuery('.local').css('display','block');	
					jQuery('.local input').addClass('required');
				}
			});
});
</script>
<article id="post-<?php the_ID(); ?>" <?php post_class('resto-location'); ?>>
	<div class="group">
		<?php echo apply_filters('the_content', get_post_meta( $post->ID, 'ba_slider_reataurant', true)); ?>
	</div>
	<div class="group">
			<div class="group breadcrumb">
				<?php the_breadcrumb(); ?>
			</div>	
			<header class="entry-header">
				<h1 class="entry-title"><?php the_title(); ?></h1>
			</header><!-- .entry-header -->
	
			<div class="entry-content">
				<?php the_content(); ?>
				<?php
					wp_link_pages( array(
						'before' => '<div class="page-links">' . __( 'Pages:', 'woodranch' ),
						'after'  => '</div>',
					) );
				?>
            <form action="<?php the_permalink();?>" id="contactform" name="contactform" method="post">
            <b>Leave a Message</b>
            	<div class="su-row contact">
                	<div class="su-column su-column-size-1-2">
                    	<h6>Your Contact Info</h6>
                    	<label>First Name <span class="required">*</span></label>
                        <input type="text" name="first-name" class="required" title=" "><br />
                        <label>Last Name <span class="required">*</span></label>
                        <input type="text" name="last-name" class="required" title=" "><br />
                        <label>Phone <span class="required">*</span></label>
                        <input type="text" name="phone" class="required" title=" "><br />
                        <label>Email <span class="required">*</span></label>
                        <input type="text" name="email" class="required email" id="email" title=" "><br />
                        <label>Confirm Email <span class="required">*</span></label>
                        <input type="text" name="confirm-email" equalTo="#email" class="required email" title=" "><br />
                    </div>
                    <div class="su-column su-column-size-1-2">
                    	<h6>This is regarding a...</h6>
                    	<select name="topic" class="contact-select required" title=" " id="select-topic">
                        	<option value="">Choose Topic...</option>
                            <?php
								$topic_email_option=my_option('topic_email');
								$topic_email_ex=explode(',',$topic_email_option);
								foreach($topic_email_ex as $topic_email){
									$topic_email_pc=explode('|',$topic_email);
							?>
                            <option value="<?php echo trim($topic_email_pc[0]);?>" <?php if(isset($topic_email_pc[2])){?>  class="short"<?php } ?>><?php echo trim($topic_email_pc[0]);?></option>
                            <?php }?>
                        </select><br />
                        <div class="local">
                        <select name="location" class="contact-select">
                        	<option value="">Choose Location</option>
                            <option value="Indonesia">Indonesia</option>
                        </select><br />
                        <label>Server / Cashier <span class="required">*</span></label>
                        <input type="text" name="server" class="required" title=" "><br />
                        <label>Date (mm/dd/yy) <span class="required">*</span></label>
                        <input type="text" name="datecontact"  class="required" title=" " id="date_arr">
                        <label style="text-align:right">Time <span class="required">*</span>
                        <input type="text" name="timecontact"  class="required" title=" " id="time_contact"></label><br />
                        <label>Check # </label>
                        
                        <input type="text" name="check"><br />
                        </div>
                        <label>Comment</label><br />
                        <textarea name="comment"></textarea><br />
                        <input type="checkbox" name="checkboxcontact" class="checkbox required" title=" "  style="margin-top:15px;" /> Please contact me regarding this request.<br />
                        <p align="center"><input type="submit" value="SEND" name="submit" class="buttonorder" />
                        <input type="hidden" name="submitcontact" value="submitted" /></p>
                    </div>
                    <?php if(isset($emailSent) && $emailSent == true) { ?><p align="center" style="color:#0000FF">EMail Sent succesfully</p><?php }?>
                </div>
            </form>
		</div>
	</div>
	<?php edit_post_link( __( 'Edit', 'woodranch' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
	</article><!-- #post-## -->